package com.bungarus.busi;

import com.bungarus.Transfer;
import com.bungarus.config.ChannelServerInitializer;
import io.netty.channel.socket.SocketChannel;

/**
 * Created by tang on 2018/11/25.
 */
public class TransferServerChildHandlerInitializer extends ChannelServerInitializer {

    private final Transfer transfer;

    public TransferServerChildHandlerInitializer(Transfer transfer) {
        this.transfer = transfer;
    }

    @Override
    protected void initServerServiceHandlers(SocketChannel socketChannel) {
        socketChannel.pipeline().addLast(new ProcessMessagesFromAccessHandler(transfer));
/*
        if(Access.PORT_7700 == socketChannel.localAddress().getPort() ||
                Access.PORT_7800 == socketChannel.localAddress().getPort()){
            socketChannel.pipeline().addLast(new ServerMediaHandler());
        }
 */
    }

    @Override
    protected void initNormalHandlers(SocketChannel socketChannel) {

    }
}
